package cc.lj.internal.api.coupons.api.ticket;

import cc.lj.internal.api.core.config.FeignConfiguration;
import cc.lj.internal.api.coupons.api.ticket.fallbackfactory.TicketBatchFeignServiceFallbackFactory;
import cc.lj.internal.api.coupons.dto.TicketBatchApiDTO;
import cc.lj.internal.core.http.HttpResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 电子券批次表对外feign api
 * @author liangxifeng
 * @date 2022-01-13
 */
@FeignClient(contextId = "f-lj-internal-coupons-ticketBatchFeignService",
        name = "lj-internal-coupons",
        //url = "http://192.168.15.110:8050",
        url = "${feign.couponsUrl}", //后续如果使用nacos服务发现，则将改行去掉即可
        path = "ticketBatch",
        configuration = {FeignConfiguration.class},
        fallbackFactory = TicketBatchFeignServiceFallbackFactory.class
)
public interface TicketBatchFeignService {
    /**
     * 通过主键批量查询电子券批次数据
     * @param batchIds
     * @return
     */
    @PostMapping("/getListByIds")
    HttpResult<List<TicketBatchApiDTO>> getListByIds(@RequestBody List<Integer> batchIds);
}
